package com.hyh.shiyanshiguanli.mapper;

import com.hyh.shiyanshiguanli.domain.entity.InstrumentDate;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author hyh
 * @version 1.0
 */
@Mapper
public interface InstrumentDateMapper {

    @Insert("insert into instrument_data (lab_lesson_id, instrument_id, instrument, need_num) " +
            "values (#{labLessonId},#{instrumentId},#{instrument},#{needNum})")
    void add(InstrumentDate instrument);

    @Select("select * from instrument_data where lab_lesson_id = #{id}")
    List<InstrumentDate> selectById(@Param("id") Integer id);
}
